<template>
  <div>
    <myHeader/>
    <div class="main_show">
      <section class="cd-horizontal-timeline">
        <div class="events-content">
          <ol>
            <li class="selected" data-date="16/01/2014">
              <h2>{{title}}</h2>
              <em>{{createTime}}</em>
              <p>
                {{content}}
              </p>
            </li>

            <li data-date="28/02/2014">
              <!-- event description here -->
            </li>

            <!-- other descriptions here -->
          </ol>
        </div>
        <!-- .events-content -->
      </section>
    </div>

  </div>
</template>


<script>
// @ is an alias to /src
import myHeader from "@/components/header.vue";

export default {
  name: "NoticeDetail",
  data() {
      return {
        title: "test",
        createTime: "test",
        content: "test"
      }
  },
  components: {
    myHeader,
  },
  mounted() {
    const routerParams = this.$route.query.notice_id;
    this.$axios({
      method: "GET",
      url: "http://81.70.192.34:8088/notice/search",
    })
      .then((res) => {
        console.log(res.data.data.records);
        this.tableData = res.data.data.records;
        this.title = "test";
        // this.tableData = res.data;
        // console.log(res.data.records)
        console.log(this.tableData);
      })
      .catch((error) => {
        console.error(error);
      });
    console.log(routerParams);
  },
};
</script>

<style scoped>
.cd-horizontal-timeline .events-content {
  position: relative;
}
.cd-horizontal-timeline .events-content li {
  position: absolute;
  z-index: 1;
  width: 100%;
  left: 0;
  top: 0;
  transform: translateX(-100%);
  opacity: 0;
  animation-duration: 0.4s;
  animation-timing-function: ease-in-out;
}
.cd-horizontal-timeline .events-content li.selected {
  /* visible event content */
  position: relative;
  z-index: 2;
  opacity: 1;
  transform: translateX(0);
}
.cd-horizontal-timeline .events-content li.enter-right,
.cd-horizontal-timeline .events-content li.leave-right {
  animation-name: cd-enter-right;
}
.cd-horizontal-timeline .events-content li.enter-left,
.cd-horizontal-timeline .events-content li.leave-left {
  animation-name: cd-enter-left;
}
.cd-horizontal-timeline .events-content li.leave-right,
.cd-horizontal-timeline .events-content li.leave-left {
  animation-direction: reverse;
}
@keyframes cd-enter-right {
  0% {
    opacity: 0;
    transform: translateX(100%);
  }
  100% {
    opacity: 1;
    transform: translateX(0%);
  }
}
@keyframes cd-enter-left {
  0% {
    opacity: 0;
    transform: translateX(-100%);
  }
  100% {
    opacity: 1;
    transform: translateX(0%);
  }
}
</style>